package com.ems.service.impl;

import com.ems.entity.TUser;
import com.ems.entity.TUserRole;
import com.ems.mapper.TUserMapper;
import com.ems.mapper.TUserRoleMapper;
import com.ems.service.TUserRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ZZH
 * @since 2022-06-27
 */
@Service
public class TUserRoleServiceImpl extends ServiceImpl<TUserRoleMapper, TUserRole> implements TUserRoleService {
    @Autowired
    TUserRoleMapper tUserRoleMapper;


    //查单
    @Override
    public TUserRole findOne(Integer userId){
        return baseMapper.findOne(userId);
    }

    //查全
    @Override
    public List<TUserRole> findAll(){
        return baseMapper.findAll();
    }
}
